package com.ceres.login.pojo;



import javax.persistence.Id;
import javax.persistence.Table;
import java.util.HashSet;
import java.util.Set;
@Table(name = "t_user")
public class Admin {
  @Id
  private long id;
  private String name;
  private String username;
  private String password;
  private String email;
  private String phone;
  private String status;
  private Set<Role> roles = new HashSet<Role>(0);//对应角色集合


  public Set<Role> getRoles() {
    return roles;
  }

  public void setRoles(Set<Role> roles) {
    this.roles = roles;
  }

  public Admin(long id, String name, String username, String password, String email, String phone, String status) {
    this.id = id;
    this.name = name;
    this.username = username;
    this.password = password;
    this.email = email;
    this.phone = phone;
    this.status = status;
  }

  public Admin() {
  }

  public long getId() {
    return id;
  }

  public void setId(long id) {
    this.id = id;
  }


  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }


  public String getUsername() {
    return username;
  }

  public void setUsername(String username) {
    this.username = username;
  }


  public String getPassword() {
    return password;
  }

  public void setPassword(String password) {
    this.password = password;
  }


  public String getEmail() {
    return email;
  }

  public void setEmail(String email) {
    this.email = email;
  }


  public String getPhone() {
    return phone;
  }

  public void setPhone(String phone) {
    this.phone = phone;
  }


  public String getStatus() {
    return status;
  }

  public void setStatus(String status) {
    this.status = status;
  }

  @Override
  public String toString() {
    return "Admin{" +
            "id=" + id +
            ", name='" + name + '\'' +
            ", username='" + username + '\'' +
            ", password='" + password + '\'' +
            ", email='" + email + '\'' +
            ", phone='" + phone + '\'' +
            ", status='" + status + '\'' +
            ", roles=" + roles +
            '}';
  }
}
